<?php
session_start();
if (isset($_SESSION['openid'])){
    include_once("../c/config.php");
    $mysqli = new mysqli($dbhost, $dbuser, $dbpwd, $dbName);
    if (!$mysqli->set_charset("utf8")) {printf("Error loading character set utf8: %s\n", $mysqliTwo->error);}
    $openid=$_SESSION['openid'];
    
    $jinfo=array();
    
    
     
    $query=$mysqli->query("select id,ling1,ling2,ling3,ling4,jid,createtime from play where openid='".$openid."' order by jid ");
    while ($list=$query->fetch_array()){
        $jinfo[]=array(
            'l1'=>$list['ling1'],'l2'=>$list['ling2'],'l3'=>$list['ling3'],
            'l4'=>$list['ling4'],'j'=>$list['jid'],'id'=>$list['id'], 't'=>$list['createtime']
        );
    }
    echo json_encode($jinfo);
}
?>
